<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>sigaddset</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_008_588">&nbsp;</a>NAME</h4><blockquote>
sigaddset - add a signal to a signal set
</blockquote><h4><a name = "tag_000_008_589">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="signal.h.html">signal.h</a>&gt;

int sigaddset(sigset_t *<i>set</i>, int <i>signo</i>);
</code>
</pre>
</blockquote><h4><a name = "tag_000_008_590">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>sigaddset()</i>
function adds the individual signal specified by the
<i>signo</i> to the signal set pointed to by <i>set</i>.
<p>
Applications must call either
<i><a href="sigemptyset.html">sigemptyset()</a></i>
or
<i><a href="sigfillset.html">sigfillset()</a></i>
at least once for each object of type
<b>sigset_t</b>
prior to any other use of that object.
If such an object is not initialised in this way, but is
nonetheless supplied as an argument to any of
<i><a href="sigaction.html">sigaction()</a></i>,
<i>sigaddset()</i>,
<i><a href="sigdelset.html">sigdelset()</a></i>,
<i><a href="sigismember.html">sigismember()</a></i>,
<i><a href="sigpending.html">sigpending()</a></i>
or
<i><a href="sigprocmask.html">sigprocmask()</a></i>,
the results are undefined.
</blockquote><h4><a name = "tag_000_008_591">&nbsp;</a>RETURN VALUE</h4><blockquote>
Upon successful completion,
<i>sigaddset()</i>
returns 0.  Otherwise, it returns -1 and sets
<i>errno</i>
to indicate the error.
</blockquote><h4><a name = "tag_000_008_592">&nbsp;</a>ERRORS</h4><blockquote>
The
<i>sigaddset()</i>
function may fail if:
<dl compact>

<dt>[EINVAL]<dd>
The value of the
<i>signo</i>
argument is an invalid or unsupported signal number.

</dl>
</blockquote><h4><a name = "tag_000_008_593">&nbsp;</a>EXAMPLES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_008_594">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_008_595">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_008_596">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="sigaction.html">sigaction()</a></i>,
<i><a href="sigdelset.html">sigdelset()</a></i>,
<i><a href="sigemptyset.html">sigemptyset()</a></i>,
<i><a href="sigfillset.html">sigfillset()</a></i>,
<i><a href="sigismember.html">sigismember()</a></i>,
<i><a href="sigpending.html">sigpending()</a></i>,
<i><a href="sigprocmask.html">sigprocmask()</a></i>,
<i><a href="sigsuspend.html">sigsuspend()</a></i>,
<i><a href="signal.h.html">&lt;signal.h&gt;</a></i>.
</blockquote><h4>DERIVATION</h4><blockquote>
Derived from the POSIX.1-1988 standard.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>

